package EVO.around;

import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.annotation.Around;
import org.aspectj.lang.annotation.Aspect;

import java.util.Date;

@Aspect
public class MyAspect {
    @Around(value = "execution(String *..*.doFirst(..))")
    public Object myAround(ProceedingJoinPoint pjp){
        Object result = null;
        System.out.println("环绕通知目标方法前调用......."+new Date());

        try {
            result = pjp.proceed();
            System.out.println("环绕通知目标方法后调用.......提交事务");
        } catch (Throwable throwable) {
            throwable.printStackTrace();
        }
        result = "jojo";

        return result;
    }

}
